import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/hosp/home'
  },
  {
    path: '/hosp/login',
    name: 'login',
    component: () => import('@h/views/audit/login.vue')
  },
  {
    path: '/hosp/layout',
    name: 'layout',
    component: () => import('@h/views/layout/index.vue'),
    children: [
      {
        path: '/hosp/home',
        name: 'home',
        component: () => import('@h/views/home/index.vue'),
        meta: {
          menu: false
        }
      },
      {
        path: '/hosp/home/warning',
        name: 'warning',
        component: () => import('@h/views/home/warning.vue'),
        meta: {
          name: '告警系统'
        },
      },
      
      // 绩效考核自评
      {
        path: '/hosp/self-evaluation',
        name: 'self-evaluation',
        component: () => import('@h/views/self-evaluation/index.vue'),
        meta: {
          name: '二级公立中医院绩效考核指标自评'
        },
      },
      {
        path: '/hosp/self-evaluation/detail',
        name: 'quota-detail',
        component: () => import('@h/views/self-evaluation/detail.vue'),
      },

      // 远程会诊监控
      {
        path: '/hosp/remote-consultation',
        name: 'remote-consultation',
        component: () => import('@h/views/remote-consultation/index.vue'),
      },
      {
        path: '/hosp/remote-consultation/list',
        name: 'consultation-list',
        component: () => import('@h/views/remote-consultation/list.vue'),
      },
          
      // 数据上传
      {
        path: '/hosp/data-upload',
        name: 'data-upload',
        component: () => import('@h/views/data-upload/index.vue'),
      },
      {
        path: '/hosp/data-upload/list',
        name: 'data-list',
        component: () => import('@h/views/data-upload/list.vue'),
      },
      {
        path: '/hosp/data-upload/data-form',
        name: 'data-form',
        component: () => import('@h/views/data-upload/data-form.vue'),
      },
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
